/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: any) {
  const { user } = initialState ?? {};
  return {
    admin: user?.role=="admin",
    user: user?.role=="user",
  };
}
